<%--
    Document   : AddProduct
    Created on : Apr 2, 2011, 11:10:57 AM
    Author     : muhammad
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">

<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>Edit Product</title>
    </head>
    <body>
        <div id="main_container">
            <jsp:include page="Banner.html" />
            <jsp:include page="menuTab.jsp" />
            <jsp:include page="/AllCategory" />
            <div class="center_content">
                <div class="center_title_bar">Edit Product</div>

                <div class="prod_box_big">
                    <div class="top_prod_box_big"></div>
                    <div class="center_prod_box_big">

                        <form name="formAddProduct" action="EditProduct">
                            <div id="divName" class="form_row">
                                <label class="contact"><strong>Name:</strong></label>
                                <input  id="textProductName" name="productName" type="text" class="contact_input" value="${product.productName}"/>
                            </div>

                            <div id="divName" class="form_row">
                                <label class="contact"><strong>Price:</strong></label>
                                <input  id="textProductPrice" name="productPrice" type="text" class="contact_input" value="${product.price}"/>
                            </div>

                            <div id="divName" class="form_row">
                                <label class="contact"><strong>Amount:</strong></label>
                                <input  id="textProductAmount" name="productAmount" type="text" class="contact_input" value="${product.amount}"/>
                            </div>

                            <div id="divName" class="form_row">
                                <label class="contact"><strong>Category:</strong></label>
                                <select name="lstCategories">
                                    <c:forEach items="${allCategories}" var="category">
                                        <option value="${category.productCategoryId}">${category.categoryName}</option>
                                    </c:forEach>
                                </select>
                            </div>

                            <%--<div id="divName" class="form_row">
                                <label class="contact"><strong>Image:</strong></label>
                                <input  id="textProductImage" style="height: auto;" name="productImage" type="file" class="contact_input"/>
                            </div>--%>

                            <div id="divName" class="form_row">
                                <label class="contact"><strong>Info:</strong></label>
                                <textarea class="contact_textarea" cols="40" rows="5" id="textProductDescription" name="productDescription">${product.productNotes}</textarea>
                            </div>

                            <input type="hidden" name="action" value="save" />
                            <input type="hidden" name="productID" value="${product.productId}" />

                            <div id="divName" class="form_row">
                                <input type="submit" value="Save" />
                            </div>

                        </form>

                    </div>
                    <div class="bottom_prod_box_big"></div>
                </div>
            </div>
            <jsp:include page="Cart.jsp" />
            <jsp:include page="Footer.html" />
        </div>

    </body>
</html>
